package cn.ad.server.domain.ad;

import java.io.Serializable;

public class Interest implements Serializable {

	private static final long serialVersionUID = 7006980481504886993L;

	static final String VERSION = "0";
	static final String CACHE_NAME = "interest";

	private int id;
	private String name;
	private int parentId;

	public static String cacheKey(long id) {
		return new StringBuilder(CACHE_NAME).append(":").append(VERSION).append(":").append(id).toString();
	}

	public String toCacheKey() {
		return new StringBuilder(CACHE_NAME).append(":").append(VERSION).append(":").append(this.getId()).toString();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getParentId() {
		return parentId;
	}

	public void setParentId(int parentId) {
		this.parentId = parentId;
	}
	
}
